/*global define, require */

define(['app'], function (app) {
    'use strict';

    app.config(['$stateProvider', '$urlRouterProvider',
        function ($stateProvider, $urlRouterProvider) {

            $stateProvider
                .state('login', {
                    url: "/login?from&fromParams&to&toParams&w",
                    templateUrl: "../view/login.html",
                    controller: 'LoginCtrl'
                })
                .state('help', { //帮助中心
                    url: '/help',
                    templateUrl: '../view/help/index.html',
                    controller: 'help_IndexCtrl'
                })
                .state('help-list', { //帮助中心详情
                    url: '/help-list/:id',
                    templateUrl: '../view/help/list.html',
                    controller: 'help_ListCtrl'
                })
                .state('help-item', { //帮助中心详情
                    url: '/help-item/:id',
                    templateUrl: '../view/help/item.html',
                    controller: 'help_ItemCtrl'
                })
                .state('tab', {
                    url: "/tab",
                    abstract: true,
                    templateUrl: "../view/tabs.html"
                })
                .state('tab.index', {
                    url: '/index?recommendInfos&tf_op_station&app_context_name',
                    views: {
                        'tab-index': {
                            templateUrl: '../view/tab-index.html',
                            controller: 'IndexCtrl'
                        }
                    }
                })
                .state('tab.index-concern', { //我的关注
                    url: '/index-concern',
                    views: {
                        'tab-index': {
                            templateUrl: '../view/product/concern.html',
                            controller: 'account_ConcernCtrl'
                        }
                    }
                })
                .state('tab.account-index', {
                    url: '/account-index',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/index.html',
                            controller: 'account_IndexCtrl'
                        }
                    },
                    loginStatus: true //是否需要登录 默认不需要登录
                })
                .state('tab.account-assets-index', {
                    url: '/account-assets-index',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/assetsIndex.html',
                            controller: 'account_AssetsIndexCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-shares', {
                    url: "/account-shares",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/shares.html',
                            controller: 'account_SharesCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-orders', {
                    url: "/account-orders",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/orders.html',
                            controller: 'account_OrdersCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-productOrderHistory', {
                    url: "/account-productOrderHistory?prodCode&prodSource&trans_account",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/orderProdHistory.html',
                            controller: 'account_OrderProdHistoryCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-shareDetail', {
                    url: "/account-shareDetail?allotNo&prodCode&prodSource&trans_account",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/shareDetail.html',
                            controller: 'account_ShareDetailCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-shareDetailShort', {
                    url: "/account-shareDetailShort?allotNo&prodCode&prodSource&enable_amount&payAccount&trans_account",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/shareDetailShort.html',
                            controller: 'account_ShareDetailShortCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-shareDetailBank', {
                    url: "/account-shareDetailBank?allotNo&prodCode&prodSource&trans_account",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/shareDetailBank.html',
                            controller: 'account_ShareDetailBankCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-shareDetailGather', {
                    url: "/account-shareDetailGather?allotNo&prodCode&prodSource",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/shareDetailGather.html',
                            controller: 'account_ShareDetailGatherCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-shareDetailQDII', {
                    url: "/account-shareDetailQDII?allotNo&prodCode&prodSource&trans_account",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/shareDetailQDII.html',
                            controller: 'account_ShareDetailQDIICtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.account-orderDetail', {
                    url: "/account-orderDetail?co_serial_no&allotNo&prodSource&isCurrent",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/orderDetail.html',
                            controller: 'account_OrderDetailCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('recharge-and-withdraw', { //充值提现
                    url: "/recharge-and-withdraw",
                    controller: 'account_RechargeAndWithdrawCtrl',
                    templateUrl: "../view/account/rechargeAndWithdraw.html",
                    loginStatus: true
                })
                .state('query-balance', {
                    url: '/query-balance',
                    templateUrl: '../view/account/queryBalance.html',
                    controller: 'account_QueryBalanceCtrl',
                    loginStatus: true
                })
                .state('trade-buy', {
                    url: "/trade/buy?prodCode&prodSource&add",
                    templateUrl: "../view/trade/buy.html",
                    controller: 'trade_BuyCtrl',
                    loginStatus: true
                })
                .state('agreementList', {
                    url: "/trade/agreementList?econtract_type&prod_id",
                    templateUrl: "../view/trade/agreementList.html",
                    controller: 'trade_AgreementListCtrl'
                })
                .state('agreement', {
                    url: "/trade/agreement?id&econtract_id",
                    templateUrl: "../view/trade/agreement.html",
                    controller: 'trade_AgreementCtrl'
                })
                .state('autograph', {
                    url: "/trade/autograph?id&econtract_id",
                    templateUrl: "../view/trade/autograph.html",
                    controller: 'trade_AutographCtrl'
                })
                .state('selectPayWay', {
                    url: "/trade/selectPayWay",
                    templateUrl: "../view/trade/selectPayWay.html",
                    controller: 'trade_SelectPayWayCtrl',
                    loginStatus: true
                })
                .state('trade-sell', {
                    url: "/trade/sell?allotNo&prodCode&prodSource",
                    templateUrl: "../view/trade/sell.html",
                    controller: 'trade_SellCtrl',
                    loginStatus: true
                })

            /***********设置模块begin*****************/
                //账户管理
                .state('tab.account-manager', {
                    url: '/account-manager',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/manager.html',
                            controller: 'account_ManagerCtrl'
                        }
                    },
                    loginStatus: true
                })
                //开户
                .state('tab.account-openAccount', {
                    url: '/account-openAccount/:typeid',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openAccount.html',
                            controller: 'account_OpenAccountCtrl'
                        }
                    },
                    loginStatus: true
                })
                //开户身份核对
                .state('tab.account-openAccountId', {
                    url: '/account-openAccountId/:typeid',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openAccountId.html',
                            controller: 'account_OpenAccountIdCtrl'
                        }
                    },
                    loginStatus: true
                })
                //开户视频验证
                .state('tab.account-openAccountVideo', {
                    url: '/account-openAccountVideo/:typeid',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openAccountVideo.html',
                            controller: 'account_OpenAccountVideoCtrl'
                        }
                    },
                    loginStatus: true
                })
                //转户
                .state('tab.account-transAccount', {
                    url: '/account-transAccount/:typeid',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/transAccount.html',
                            controller: 'account_TransAccountCtrl'
                        }
                    },
                    loginStatus: true
                })
                //TA开户
                .state('tab.account-openta', {
                    url: '/account-openta/:typeid',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openAccountTA.html',
                            controller: 'account_OpenTACtrl'
                        }
                    },
                    loginStatus: true
                })
                //开户协议列表
                .state('tab.account-agreementlist', {
                    url: '/account-agreementlist',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/agreementList.html',
                            controller: 'account_AgreementListCtrl'
                        }
                    },
                    loginStatus: true
                })
                //开户协议详细
                .state('tab.account-agreement', {
                    url: '/account-agreement/:id',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/agreement.html',
                            controller: 'account_AgreementCtrl'
                        }
                    },
                    loginStatus: true
                })
                ////易融通
                //.state('tab.account-easyFinancingHome', {
                //    url: '/account-easyFinancingHome',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingHome.html',
                //            controller: 'account_EasyFinancingHomeCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通介绍
                //.state('tab.account-easyFinancing', {
                //    url: '/account-easyFinancing',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancing.html',
                //            controller: 'account_EasyFinancingCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通开通
                //.state('tab.account-easyFinancingOpen', {
                //    url: '/account-easyFinancingOpen',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingOpen.html',
                //            controller: 'account_EasyFinancingOpenCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通开通风险测评
                //.state('tab.account-easyFinancingRisk', {
                //    url: '/account-easyFinancingRisk',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingRisk.html',
                //            controller: 'account_RiskCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通开通征信
                //.state('tab.account-easyFinancingCredit', {
                //    url: '/account-easyFinancingCredit',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingCredit.html',
                //            controller: 'account_EasyFinancingCreditCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通开通协议
                //.state('tab.account-easyFinancingAgreement', {
                //    url: '/account-easyFinancingAgreement/:typeid',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingAgreement.html',
                //            controller: 'account_EasyFinancingAgreementCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通权限管理
                //.state('tab.account-easyFinancingJurisdiction', {
                //    url: '/account-easyFinancingJurisdiction',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingJurisdiction.html',
                //            controller: 'account_EasyFinancingJurisdictionCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////易融通股票质押借款申请
                //.state('tab.account-easyFinancingIntelligenceLoan', {
                //    url: '/account-easyFinancingIntelligenceLoan',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingIntelligenceLoan.html',
                //            controller: 'account_EasyFinancingIntelligenceLoanCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////手工股票质押借款申请
                //.state('tab.account-easyFinancingManual', {
                //    url: '/account-easyFinancingManual',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingManual.html',
                //            controller: 'account_EasyFinancingManualCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////手工选择质押股票
                //.state('tab.account-easyFinancingManualLoan', {
                //    url: '/account-easyFinancingManualLoan',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingManualLoan.html',
                //            controller: 'account_EasyFinancingManualLoanCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////质押股票
                //.state('tab.account-easyFinancingLoan', {
                //    url: '/account-easyFinancingLoan',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingLoan.html',
                //            controller: 'account_EasyFinancingLoanCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                //设置借款周期
                //.state('tab.account-borrowingPeriod', {
                //    url: '/account-borrowingPeriod/:typeid',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/borrowingPeriod.html',
                //            controller: 'account_BorrowingPeriodCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////设置借款用途
                //.state('tab.account-usageOfLoan', {
                //    url: '/account-usageOfLoan',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/usageOfLoan.html',
                //            controller: 'account_UsageOfLoanCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                //借款记录
                //.state('tab.account-easyFinancingRepayment', {
                //    url: '/account-easyFinancingRepayment',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingRepayment.html',
                //            controller: 'account_EasyFinancingRepaymentCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////补充质押
                //.state('tab.account-easyFinancingPledge', {
                //    url: '/account-easyFinancingPledge',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingPledge.html',
                //            controller: 'account_EasyFinancingPledgeCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////股票详情
                //.state('tab.account-easyFinancingSharesDetail', {
                //    url: '/account-easyFinancingSharesDetail/:id',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingSharesDetail.html',
                //            controller: 'account_EasyFinancingSharesDetailCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////到期还款
                //.state('tab.account-easyFinancingRepay', {
                //    url: '/account-easyFinancingRepay/:id',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingRepay.html',
                //            controller: 'account_EasyFinancingRepayCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////贷款计算器
                //.state('tab.account-easyFinancingCounter', {
                //    url: '/account-easyFinancingCounter',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/easyFinancingCounter.html',
                //            controller: 'account_EasyFinancingCounterCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                //创业板转签
                .state('tab.account-entrep', {
                    url: '/account-entrep',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/entrepreneurship.html',
                            controller: 'account_EntrepreneurshipCtrl'
                        }
                    },
                    loginStatus: true
                })
                //立即转签
                .state('tab.account-sign', {
                    url: '/account-sign',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/sign.html',
                            controller: 'account_SignCtrl'
                        }
                    },
                    loginStatus: true
                })
                //营业部地址
                .state('tab.account-saleDepartment', {
                    url: '/account-saleDepartment',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/saleDepartment.html',
                            controller: 'account_SaleDepartmentCtrl'
                        }
                    },
                    loginStatus: true
                })
                //电子签名约定书
                //.state('tab.account-esignature', {
                //    url: '/account-esignature',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/electronicSignature.html',
                //            controller: 'account_EsignatureCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                //学历
                .state('tab.account-degree', {
                    url: '/account-degree',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/degree.html',
                            controller: 'account_DegreeCtrl'
                        }
                    },
                    loginStatus: true
                })
                //职业
                .state('tab.account-profession', {
                    url: '/account-profession',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/profession.html',
                            controller: 'account_ProfessionCtrl'
                        }
                    },
                    loginStatus: true
                })
                //关系
                .state('tab.account-relationship', {
                    url: '/account-relationship',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/relationship.html',
                            controller: 'account_RelationshipCtrl'
                        }
                    },
                    loginStatus: true
                })
                //修改手机号
                .state('tab.account-phoneModify', {
                    url: '/account-phoneModify',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/phoneModify.html',
                            controller: 'account_PhoneModifyCtrl'
                        }
                    },
                    loginStatus: true
                })
                //原手机号验证
                .state('tab.account-modifyPhoneFirst', {
                    url: '/account-modifyPhoneFirst',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/modifyPhoneFirst.html',
                            controller: 'account_ModifyPhoneFirstCtrl'
                        }
                    },
                    loginStatus: true
                })
                //新手机号提交
                .state('tab.account-modifyPhoneLast', {
                    url: '/account-modifyPhoneLast',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/modifyPhoneLast.html',
                            controller: 'account_ModifyPhoneLastCtrl'
                        }
                    },
                    loginStatus: true
                })
                //重置手机号
                .state('tab.account-resetPhoneFirst', {
                    url: '/account-resetPhoneFirst',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/resetPhoneFirst.html',
                            controller: 'account_ResetPhoneFirstCtrl'
                        }
                    },
                    loginStatus: true
                })
                //通讯地址
                .state('tab.account-address', {
                    url: '/account-address',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/address.html',
                            controller: 'account_AddressCtrl'
                        }
                    },
                    loginStatus: true
                })
                //邮政编码
                .state('tab.account-postcode', {
                    url: '/account-postcode',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/postcode.html',
                            controller: 'account_PostCodeCtrl'
                        }
                    },
                    loginStatus: true
                })
                //身份核对
                .state('tab.account-resetPhoneSecond', {
                    url: '/account-resetPhoneSecond',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/resetPhoneSecond.html',
                            controller: 'account_ResetPhoneSecondCtrl'
                        }
                    },
                    loginStatus: true
                })
                //视频核对
                .state('tab.account-resetPhoneThird', {
                    url: '/account-resetPhoneThird',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/resetPhoneThird.html',
                            controller: 'account_ResetPhoneThirdCtrl'
                        }
                    },
                    loginStatus: true
                })
                //消息列表
                //.state('tab.account-message', {
                //    url: '/account-message',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/message.html',
                //            controller: 'account_MessageCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                ////消息正文
                //.state('tab.account-detail', {
                //    url: '/account-detail/:messageId',
                //    views: {
                //        'tab-account-index': {
                //            templateUrl: '../view/account/detail.html',
                //            controller: 'account_DetailCtrl'
                //        }
                //    },
                //    loginStatus: true
                //})
                //身份证信息更新
                .state('tab.account-identification', {
                    url: '/account-identification',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/identification.html',
                            controller: 'account_IdentificationCtrl'
                        }
                    },
                    loginStatus: true
                })
                //更新身份证
                .state('tab.account-changeid', {
                    url: '/account-changeid',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/changeid.html',
                            controller: 'account_ChangeIdCtrl'
                        }
                    },
                    loginStatus: true
                })
                //核对身份信息
                .state('tab.account-idcheck', {
                    url: '/account-idcheck',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/identificationCheck.html',
                            controller: 'account_IdCheckCtrl'
                        }
                    },
                    loginStatus: true
                })
                //身份信息视频验证
                .state('tab.account-userInfoVideo', {
                    url: '/account-userInfoVideo',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/userInfoVideo.html',
                            controller: 'account_UserInfoVideoCtrl'
                        }
                    },
                    loginStatus: true
                })
                //修改密码
                .state('tab.account-modifyPwd', {
                    url: '/account-modifyPwd',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/modifyPwd.html',
                            controller: 'account_ModifyPwdCtrl'
                        }
                    },
                    loginStatus: true
                })
                //风险测评
                .state('tab.account-risk', {
                    url: '/account-risk?from&fromParams',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/risk.html',
                            controller: 'account_RiskCtrl'
                        }
                    },
                    loginStatus: true
                })
                //风险测评提交
                .state('tab.account-riskEval', {
                    url: '/account-riskEval/:typeid?from&fromParams',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/riskEvaluating.html',
                            controller: 'account_RiskEvalCtrl'
                        }
                    },
                    loginStatus: true
                })
                //银行卡页面
                .state('tab.account-bank', {
                    url: '/account-bank',
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/bank.html',
                            controller: 'account_BankCtrl'
                        }
                    },
                    loginStatus: true
                })
                //补绑三方存管
                .state('tab.account-bindDepositBank', {
                    url: "/account-bindDepositBank",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/bindDepositBank.html',
                            controller: 'open_BindDepositBankCtrl'
                        }
                    },
                    loginStatus: true
                })
                //绑定快捷支付
                .state('tab.account-bindQuickBank', {
                    url: "/account-bindQuickBank",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/bindQuickBank.html',
                            controller: 'open_BindQuickBankCtrl'
                        }
                    },
                    loginStatus: true
                })
                //解绑银行卡
                .state('tab.account-unbindBank', {
                    url: "/account-unBindBank?bank_no&bank_account&bank_name",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/unbindBank.html',
                            controller: 'account_UnbindBankCtrl'
                        }
                    },
                    loginStatus: true
                })
                //开通港股通
                .state('tab.account-OpenStocksHK', {
                    url: "/account-OpenStocksHK/:typeid?go",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openStocksHK.html',
                            controller: 'account_OpenStocksHKCtrl'
                        }
                    },
                    loginStatus: true
                })
                //知识学习
                .state('tab.account-OpenKnowledge', {
                    url: "/account-OpenKnowledge/:typeid",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openKnowledge.html',
                            controller: 'account_OpenKnowledgeCtrl'
                        }
                    },
                    loginStatus: true
                })
                //知识测评
                .state('tab.account-OpenEvaluation', {
                    url: "/account-OpenEvaluation/:typeid",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openEvaluation.html',
                            controller: 'account_OpenEvaluationCtrl'
                        }
                    },
                    loginStatus: true
                })
                //风险揭示
                .state('tab.account-OpenRisk', {
                    url: "/account-OpenRisk/:typeid",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openRisk.html',
                            controller: 'account_OpenRiskCtrl'
                        }
                    },
                    loginStatus: true
                })
                //协议签署
                .state('tab.account-OpenAgreement', {
                    url: "/account-OpenAgreement/:typeid",
                    views: {
                        'tab-account-index': {
                            templateUrl: '../view/account/openAgreement.html',
                            controller: 'account_OpenAgreementCtrl'
                        }
                    },
                    loginStatus: true
                })
            /***********设置模块end*****************/

            /***********开户相关begin*****************/
                //开户准备页
                .state('open-prepare', {
                    url: "/open-prepare",
                    templateUrl: '../view/open/prepare.html',
                    controller: 'open_PrepareCtrl'
                })
                //手机号注册页
                .state('open-msgVerify', {
                    url: "/open-msgVerify",
                    templateUrl: '../view/open/msgVerify.html',
                    controller: 'open_MsgVerifyCtrl'
                })
                //营业部选择页
                .state('open-selectBranch', {
                    url: "/open-selectBranch?default_branch",
                    templateUrl: '../view/open/selectBranch.html',
                    controller: 'open_SelectBranchCtrl',
                    openStatus: true
                })
                //身份证上传
                .state('open-uploadID', {
                    url: "/open-uploadID?branch_no",
                    templateUrl: '../view/open/uploadID.html',
                    controller: 'open_UploadIDCtrl',
                    openStatus: true
                })
                //个人信息填写
                .state('open-personInfo', {
                    url: "/open-personInfo",
                    templateUrl: '../view/open/personInfo.html',
                    controller: 'open_PersonInfoCtrl',
                    openStatus: true
                })
                //数字证书安装
                .state('open-installCert', {
                    url: "/open-installCert",
                    templateUrl: '../view/open/installCert.html',
                    controller: 'open_InstallCertCtrl',
                    openStatus: true
                })
                //风险测评
                .state('open-riskAssess', {
                    url: "/open-riskAssess",
                    templateUrl: '../view/open/riskAssess.html',
                    controller: 'open_RiskAssessCtrl',
                    openStatus: true
                })
                //设置密码
                .state('open-setPwd', {
                    url: "/open-setPwd",
                    templateUrl: '../view/open/setPwd.html',
                    controller: 'open_SetPwdCtrl',
                    openStatus: true
                })
                //绑定三方存管
                .state('open-bindOpenDeposit', {
                    url: "/open-bindOpenDeposit?b",
                    templateUrl: '../view/open/bindOpenDeposit.html',
                    controller: 'open_BindDepositBankCtrl',
                    openStatus: true
                })
                //绑定开户银行卡
                .state('open-bindOpenQuick', {
                    url: "/open-bindOpenQuick?b",
                    templateUrl: '../view/open/bindOpenQuick.html',
                    controller: 'open_BindQuickBankCtrl',
                    openStatus: true
                })
                //签署协议
                .state('open-signAgreement', {
                    url: "/open-signAgreement",
                    templateUrl: '../view/open/signAgreement.html',
                    controller: 'open_SignAgreementCtrl',
                    openStatus: true
                })
                //回访问卷
                .state('open-revisitPaper', {
                    url: "/open-revisitPaper",
                    templateUrl: '../view/open/revisitPaper.html',
                    controller: 'open_RevisitPaperCtrl',
                    openStatus: true
                })
                //开户结果
                .state('open-openResult', {
                    url: "/open-openResult?open_status",
                    templateUrl: '../view/open/openResult.html',
                    controller: 'open_OpenResultCtrl',
                    openStatus: true
                })
                //有奖测评
                .state('open-channelRisk', {
                    url: "/open-channelRisk?paper_id&product_no",
                    templateUrl: '../view/open/channelRisk.html',
                    controller: 'open_ChannelRiskCtrl'
                })
            /***********开户相关end*****************/

            /***********产品中心begin*****************/

                .state('tab.search', {	//搜索
                    url: "/search",
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/search.html',
                            controller: 'product_SearchCtrl'
                        }
                    }
                })
                .state('tab.product-fundTerm', {
                    url: '/product-fundTerm',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/fundTerm.html',
                            controller: 'product_FundTermCtrl'
                        }
                    }
                })
                .state('tab.product-item', {
                    url: '/product-item/:prod_code',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/item.html',
                            controller: 'product_ItemCtrl'
                        }
                    }
                })
                .state('tab.product-detail', {
                    url: '/product-detail/:prod_code',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/detail.html',
                            controller: 'product_DetailCtrl'
                        }
                    }
                })
                .state('tab.product-item-otc', {
                    url: '/product-item-otc/:prod_code',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/item-otc.html',
                            controller: 'product_ItemOtcCtrl'
                        }
                    }
                })
                .state('tab.product-item-otc-float', {
                    url: '/product-item-otc-float/:prod_code',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/item-otc-float.html',
                            controller: 'product_ItemOtcFloatCtrl'
                        }
                    }
                })
                .state('tab.product-detail-otc', {
                    url: '/product-detail-otc/:prod_code',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/detail-otc.html',
                            controller: 'product_DetailOtcCtrl'
                        }
                    }
                })
                .state('tab.product-item-QDII', {
                    url: '/product-item-QDII/:prod_code?is_index',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/item-QDII.html',
                            controller: 'product_ItemQDIICtrl'
                        }
                    }
                })
                //.state('tab.product-index', {
                //    url: '/product-index',
                //    views: {
                //        'tab-product-index': {
                //            templateUrl: '../view/product/index.html',
                //            controller: 'product_IndexCtrl'
                //        }
                //    }
                //})
                .state('tab.product-currentTerm', {
                    url: '/product-currentTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/currentTerm.html',
                            controller: 'product_CurrentTermCtrl'
                        }
                    }
                })
                .state('tab.product-more', {
                    url: '/product-more',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/moreProduct.html',
                            controller: 'product_MoreCtrl'
                        }
                    }
                })
                .state('tab.product-starTerm', {
                    url: '/product-starTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/starTerm.html',
                            controller: 'product_StarTermCtrl'
                        }
                    }
                })
                .state('tab.product-shortTerm', {
                    url: '/product-shortTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/shortTerm.html',
                            controller: 'product_ShortTermCtrl'
                        }
                    }
                })
                .state('tab.product-tfTerm', {
                    url: '/product-tfTerm/:id?index',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/tfTerm.html',
                            controller: 'product_TFTermCtrl'
                        }
                    },
                    loginStatus: true
                })
                .state('tab.product-longTerm', {
                    url: '/product-longTerm/:id?index',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/longTerm.html',
                            controller: 'product_LongTermCtrl'
                        }
                    }
                })
                .state('tab.product-goldTerm', {
                    url: '/product-goldTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/goldTerm.html',
                            controller: 'product_GoldTermCtrl'
                        }
                    }
                })
                .state('tab.product-overseaTerm', {
                    url: '/product-overseaTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/overseaTerm.html',
                            controller: 'product_QDIITermCtrl'
                        }
                    }
                })
                .state('tab.product-goodsTerm', {
                    url: '/product-goodsTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/goodsTerm.html',
                            controller: 'product_QDIITermCtrl'
                        }
                    }
                })
                .state('tab.product-landLordTerm', {
                    url: '/product-landLordTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/landLordTerm.html',
                            controller: 'product_QDIITermCtrl'
                        }
                    }
                })
                .state('tab.product-indexTerm', {
                    url: '/product-indexTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/indexTerm.html',
                            controller: 'product_IndexTermCtrl'
                        }
                    }
                })
                .state('tab.product-stockTerm', {
                    url: '/product-stockTerm/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/stockTerm.html',
                            controller: 'product_StockTermCtrl'
                        }
                    }
                })
                .state('tab.product-rate', {
                    url: '/product-rate/:id',
                    views: {
                        'tab-product-index': {
                            templateUrl: '../view/product/rate.html',
                            controller: 'product_RateCtrl'
                        }
                    }
                })
            /***********产品中心end*****************/

            /***********推广begin*****************/

                .state('promo-tianti3', {
                    url: '/promo-tianti3/:id',
                    templateUrl: '../view/promo/tianti/3.html',
                    controller: 'promo_OtcCtrl'
                })
                .state('promo-tianti2', {
                    url: '/promo-tianti2/:id',
                    templateUrl: '../view/promo/tianti/2.html',
                    controller: 'promo_UeRewardCtrl'
                })
                .state('promo-otc-float', {
                    url: '/promo-otc-float/:id',
                    templateUrl: '../view/promo/otc-float.html',
                    controller: 'promo_OtcCtrl'
                })
                .state('promo-guess', {
                    url: '/promo-guess/:id',
                    templateUrl: '../view/promo/theme/guess.html',
                    controller: 'promo_OtcCtrl'
                })
                .state('promo-ue-reward', {
                    url: '/promo-ue-reward/:id',
                    templateUrl: '../view/promo/ueReward.html',
                    css: '../css/promo/ue-reward.css',
                    controller: 'promo_UeRewardCtrl'
                })
                .state('promo-subject', {
                    url: '/promo-subject/:id',
                    templateUrl: '../view/promo/subject.html',
                    controller: 'promo_SubjectCtrl'
                })
                .state('promo-past-subject', {
                    url: '/promo-past-subject',
                    templateUrl: '../view/promo/pastSubject.html',
                    controller: 'promo_PastSubjectCtrl'
                })
                .state('promo-otc', {
                    url: '/promo-otc/:id',
                    templateUrl: '../view/promo/otc.html',
                    controller: 'promo_OtcCtrl',
                    css: '../css/promo/otc.css'
                })
                .state('promo-wx-question', {
                    url: '/promo-wx-question',
                    templateUrl: '../view/promo/wxQuestion.html',
                    controller: 'promo_WxQuestionCtrl'
                })
                .state('promo-wx-fans', {
                    url: '/promo-wx-fans',
                    templateUrl: '../view/promo/weixin/fans.html',
                    css: '../css/promo/weixin/fans.css'
                })
                .state('promo-reward', {
                    url: '/promo-reward',
                    templateUrl: '../view/promo/reward.html',
                    controller: 'promo_RewardCtrl',
                    css: '../css/promo/reward.css'
                })
                .state('promo-theme-blueChip', {
                    url: '/promo-theme-blueChip/:id',
                    templateUrl: '../view/promo/theme/blueChip.html',
                    controller: 'promo_ThemeCtrl',
                    css: '../css/promo/theme/blueChip.css'
                })
                .state('promo-theme-bondFund', {
                    url: '/promo-theme-bondFund/:id',
                    templateUrl: '../view/promo/theme/bondFund.html',
                    controller: 'promo_ThemeCtrl',
                    css: '../css/promo/theme/bondFund.css'
                })
                .state('promo-theme-internetBank', {
                    url: '/promo-theme-internetBank/:id',
                    templateUrl: '../view/promo/theme/internetBank.html',
                    controller: 'promo_ThemeCtrl',
                    css: '../css/promo/theme/internetBank.css'
                })
                .state('promo-theme-soeReform', {
                    url: '/promo-theme-soeReform/:id',
                    templateUrl: '../view/promo/theme/soeReform.html',
                    controller: 'promo_ThemeCtrl',
                    css: '../css/promo/theme/soeReform.css'
                })
                .state('promo-theme-tianxiangOne', {
                    url: '/promo-theme-tianxiangOne/:id',
                    templateUrl: '../view/promo/theme/tianxiangOne.html',
                    controller: 'promo_ThemeCtrl',
                    css: '../css/promo/theme/tianxiangOne.css'
                })
                .state('promo-theme-ziguan', {
                    url: '/promo-theme-ziguan/:id',
                    templateUrl: '../view/promo/theme/ziguan.html',
                    controller: 'promo_ThemeCtrl',
                    css: '../css/promo/theme/ziguan.css'
                })
                .state('promo-theme-classDeposits', {
                    url: '/promo-theme-classDeposits/:id',
                    templateUrl: '../view/promo/theme/classDeposits.html',
                    controller: 'promo_TermThemeCtrl',
                    css: '../css/promo/theme/classDeposits.css'
                })
                .state('promo-theme-shortBond', {
                    url: '/promo-theme-shortBond/:id',
                    templateUrl: '../view/promo/theme/shortBond.html',
                    controller: 'promo_TermThemeCtrl',
                    css: '../css/promo/theme/shortBond.css'
                })
                .state('promo-theme-bankTheme', {
                    url: '/promo-theme-bankTheme/:id',
                    templateUrl: '../view/promo/theme/bankTheme.html',
                    controller: 'promo_BankThemeCtrl',
                    css: '../css/promo/theme-fund.css'
                })
                //理财体验
                .state('promo-preview', {
                    url: '/promo-preview',
                    templateUrl: '../view/promo/preview.html',
                    controller: 'promo_PreviewCtrl'
                })
                .state('open-fillCustomerInfo', { //理财体验
                    url: '/open-fillCustomerInfo?b',
                    templateUrl: '../view/open/fillCustomerInfo.html',
                    controller: 'open_FillCustomerInfoCtrl',
                    openStatus: true
                })
                .state('promo-theme-jGongTheme', {
                    url: '/promo-theme-jGongTheme/:id',
                    templateUrl: '../view/promo/theme/jGongTheme.html',
                    controller: 'promo_ThemeCtrl'
                })
                .state('promo-theme-xFeiTheme', {
                    url: '/promo-theme-xFeiTheme/:id',
                    templateUrl: '../view/promo/theme/xFeiTheme.html',
                    controller: 'promo_ThemeCtrl'
                })
                .state('promo-theme-hJinTheme', {
                    url: '/promo-theme-hJinTheme/:id',
                    templateUrl: '../view/promo/theme/hJinTheme.html',
                    controller: 'promo_ThemeCtrl'
                })

            /***********推广end*****************/
                .state('us', { //更多
                    url: '/us',
                    templateUrl: '../view/us/index.html',
                    controller: 'us_IndexCtrl'
                })
                .state('us-feedback', { //意见反馈
                    url: '/us-feedback',
                    templateUrl: '../view/us/feedback.html',
                    controller: 'us_FeedbackCtrl'
                })
                .state('us-contact', { //联系我们
                    url: '/us-contact',
                    templateUrl: '../view/us/contact.html'
                })
                .state('us-about', {
                    url: '/us-about',
                    templateUrl: '../view/us/about.html'
                });
            $urlRouterProvider.otherwise("/tab/index");
        }
    ]);
});